﻿using EMoney.IStock.Client.Models.MC;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace EMoney.IStock.Client.DataAccess.MC
{
    /// <summary>
    /// 我的i豆流水数据访问类
    /// </summary>
    public class MyFlowDal
    {
        /// <summary>
        /// 新增我的i豆流水数据
        /// </summary>
        /// <param name="flow"></param>
        /// <returns></returns>
        public int AddMyFlow(MC_MyFlow flow)
        {
            string sql = "insert into MC_MyFlow(UserID,iNum,Remark) values(@UserID,@iNum,@Remark)";

            SQLTools tools = new SQLTools();

            tools.AddSqlParameter("UserID", System.Data.SqlDbType.Int, flow.UserID);
            tools.AddSqlParameter("iNum", System.Data.SqlDbType.Int, flow.iNum);
            tools.AddSqlParameter("Remark", System.Data.SqlDbType.NVarChar, flow.Remark);

            return SQLHelper.ExecuteNonQuery(ConnectionManager.Emfstock, System.Data.CommandType.Text, sql, tools.GetSqlParameters());
        }
    }
}
